#!/bin/bash - 
#===============================================================================
#
#          FILE: java_iconv.sh
# 
#         USAGE: ./java_iconv.sh 
# 
#   DESCRIPTION: 
# 
#       OPTIONS: ---
#  REQUIREMENTS: ---
#          BUGS: ---
#         NOTES: ---
#        AUTHOR: YOUR NAME (), 
#  ORGANIZATION: 
#       CREATED: 2012年06月22日 00时54分23秒 CST
#      REVISION:  ---
#===============================================================================

#set -o nounset                              # Treat unset variables as an error
shopt -s -o nounset
dt=$(date '+%Y-%m-%d %H:%M:%S')
echo lastWatch=$dt
echo

logfiles=$(find /tmp/win -name 'mvn*.log')
echo -e "\tname\t\terrorCount\tlineCount"
for log in $logfiles
do
	errorCount=$(grep -c '31mERROR' $log)
	lineCount=$(sed -n '$=' $log)
	echo -e $log"\t"$errorCount"\t\t"$lineCount
done
